-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Regex benchmarks #11504
Create Regex benchmarks #11504
Conversation
New PR since I did something unfixable to the old one's branch. |
create = | ||
faker = Faker.new | ||
a_regex = Regex.compile "(\d)ab(\d)" | ||
Data.Value (build_two_nums faker) (build_just_two_nums faker) (build_four_nums faker) a_regex (build_regexes faker) (build_replacers faker) (Regex.compile "(\d+)") (Regex.compile "(\d+)[a-z]+(\d+)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this line be split into multiple ones? As
- since Move annotations into fields of Function and ConstructorDefinition #11374 it should be possible to:
Each argument in a type-constructor definition may be specified on its own (indented) line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a constructor invocation, not a definition -- should that also work? When I moved the arguments to multiple lines, I got syntax errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from Standard.Base import all
type X
Y
a
b
main = X.Y
<| 1
<| 2
<| (build_regexes faker) | ||
<| (build_replacers faker) | ||
<| (Regex.compile "(\d+)") | ||
<| (Regex.compile "(\d+)[a-z]+(\d+)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Och, óóó! That's way nicer! Honestly, up until yesterday I wasn't even aware we support such a nice syntax! I just confused this with @kazcw's multiline constructor definition and then wanted to find a way out without admitting I got confused...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also work without the parens. In an operator block, each operator takes the rest of the line as its RHS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed parens.
…so into wip/gmt/6200-regex-benches-2
Includes benchmarks verifying regex and replacer compilation memoization.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
or the Snowflake database integration, a run of the Extra Tests has been scheduled.